# 决策
# if else 
x <- 3L;
if(is.character(x)){
    print("x is character");
}else if( is.integer(x)){
    print("x is integer");
}else{
    print("x is unkown");
}

# switch 语句
x <- switch(
    2,
    "first",
    "second",
    "third",
    "fouth"
);
print( x );